package com.travelranking.rest;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.travelranking.pojo.City;

public interface RestListTravelService {

	@GET
	@Path ("/travel")
	@Produces ("application/json")
	public List<TravelWrapper> list();
	
	@GET
	@Path ("/travel/{id}")
	@Produces (MediaType.APPLICATION_JSON)
	public TravelWrapper getTravel(@PathParam("id")Long id);
	
	@PUT
	@Path ("/travel/{city}/{opinion}/{rank}")
	@Produces (MediaType.TEXT_HTML)
	public void add(@PathParam("city")City city,
			@PathParam("opinion")String opinion,
			@PathParam("rank")Integer rank );
	
	@POST
	@Path ("/travel/")
	public void addObjeto(@QueryParam("city")City city,
			@QueryParam("opinion")String opinion,
			@QueryParam("rank")Integer rank );
	
}
